package com.spring.demo.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.google.common.collect.Lists;
import com.spring.demo.AbstractDao;
import com.spring.demo.dao.IBookDao;
import com.spring.demo.pojo.Book;

/**
 *
 * @author nickel
 * @date 2019-01-25 13:39:24
 */
@Repository
public class BookDao extends AbstractDao implements IBookDao {

	private static final List<Book> books = Lists.newArrayList();

	@Override
	public boolean insert(Book book) {
		log.info("book insert with dao");
		books.add(book);
		return true;
	}

	@Override
	public List<Book> getAll() {
		log.info("book list with dao");
		return books;
	}

}
